//
//  TgModel.m
//  11212
//
//  Created by student on 16/3/7.
//  Copyright © 2016年 niit. All rights reserved.
//

#import "TgModel.h"

@implementation TgModel

-(instancetype)initWithDict:(NSDictionary *)dict{
    self=[super init];
    if (self) {
        [self setValuesForKeysWithDictionary:dict];
    }
    return self;
}
+(instancetype)tgWithDict:(NSDictionary *)dict{
    return [[self alloc]initWithDict:dict];
}

+(NSArray *)tgList{
    NSString *path=[[NSBundle mainBundle]pathForResource:@"tgs" ofType:@"plist"];
    NSArray *arr=[[NSArray alloc]initWithContentsOfFile:path];
    NSMutableArray *mArr=[NSMutableArray array];
    for (NSDictionary *dic in arr) {
        TgModel *t=[TgModel tgWithDict:dic];
        [mArr addObject:t];
    }
    return mArr;
}

@end
